package com.ssx.cloud.controller;

import com.ssx.cloud.entity.Admin;
import com.ssx.cloud.entity.CommonResult;
import com.ssx.cloud.service.FeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Package com.ssx.cloud.controller
 * @ClassName FeignController
 * @Copyright: Copyright (c) 2020
 * @Date 2020/11/20 19:53
 * @Company www.sudaoxi.com.cn
 * @Author 苏道羲
 * @Version 1.0
 * @Description
 */
@RestController
@Slf4j
public class FeignController {
    @Resource
    private FeignService feignService;

    @GetMapping("/get/{id}")
    public CommonResult<Admin> getById(@PathVariable("id") Integer id){
        return feignService.getById(id);
    }

}
